import { createLocalConfig } from './envs/local'
import { createProdConfig } from './envs/prod'
// import { createStagingConfig } from './envs/staging'
import { createStagingConfig } from '@/envConfig/envs/staging'

export const appConfig = getConfig()
function getConfig() {
  switch (process.env['ENV']) {
    case 'prod':
      return createProdConfig()
    case 'test':
      return createStagingConfig()
    case 'dev':
      return createLocalConfig()
    default:
      throw new Error(`Invalid APP_ENV "${process.env['ENV']}"`)
  }
}
